package com.nervenets.web.enumeration;

import com.nervenets.i18n.Translator;

/**
 * Created by joe on 17-3-16.
 */
public enum OperateType {
    recharge,//充值
    withdraw,//提现
    dividends,//分成
    restoreWithdraw,//提现退款
    human,//人工
    withdrawFee,//提现手续费
    timeCardBuy,//时间卡购买
    groupBuy,//拼团
    crowdfunding,//众筹
    service,//服务
    rechargeGift,//充值赠送
    groupBuyRefund,//拼团退款
    crowdfundingRefund,//众筹退款
    orderRefund,//订单取消退款
    ;

    public String getName() {
        return this.name();
    }

    public String getLabel() {
        return Translator.translate(this);
    }

    public static boolean isTrueIncome(OperateType operateType) {
        return !recharge.equals(operateType) && !restoreWithdraw.equals(operateType);
    }
}
